package com.ocom.xcxapi.controller;

import com.ocom.common.constant.CompanyServiceUrl;
import com.ocom.common.resp.Result;
import com.ocom.xcxapi.service.TcpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

//@PreAuthorize("hasRole('ROLE_XCX')")
@RestController
public class OpenController {

    @Autowired
    private TcpService tcpService;

    /**
     * 2.2.远程开门 menjin/open
     * */
    @GetMapping(CompanyServiceUrl.URL_MenjinOpen)
    public Result MenjinOpen(Long comId, String deviceNo,Long pId){

        return tcpService.MenjinOpen(comId,deviceNo,pId);
    }
}
